<?php //$this->Html->meta("keywords", h($article['Article']['meta_key']), array("inline" => false));?>
<?php //$this->Html->meta("description", h($article['Article']['meta_desc']), array("inline" => false));?>
<?php $this->Html->css('/css/products.css', array("inline" => false));?>
<?php echo $this->element('sub_menu'); ?>

  <div class="container mt-10 pt-30 pb-50">
    <div id="Side" class="col-sm-4 col-md-4">
      <h2 class="title-category"><?php echo __('Category')?></h2>
      <ul class="right-menu mb-50">
        <?php 
		foreach($recipeCategory as $key=>$category) : 
			if($key%2==0) $class ='class="odd"';
			else $class ='class="even"';
		?>
        <li <?php echo $class?>>
            <!--<a href="/recipes/category/<?php echo $category['RecipeCategory']['id']?>">
                <?php echo $category['RecipeCategory']['recipe_cate_name'. $code]?>
            </a>-->
            <?php echo $this->Html->link( $category['RecipeCategory']['recipe_cate_name'. $code], array(
                'controller' => 'recipes',
                'action' => 'category',
                'id' => $category['RecipeCategory']['id'],
                'slug' => str_replace(' ', '-', $category['RecipeCategory']['recipe_cate_name_en'])
            ));
            ?>
        </li>
        <?php endforeach;?>
      </ul><!-- /right-menu -->

      <?php echo $this->element('video');?>
    </div><!-- /#Side -->

    <div id="Main" class="col-sm-8 col-md-8">
      <section class="row cf mb-40">
        <div class="col-md-12">
          <h2 class="title-h2"><?php echo $categoryCurrent['RecipeCategory']['recipe_cate_name' . $code]?></h2>
          <div class="clear">
            <p class="text-01 mb-10 pr-50 bd-b1 pb-20">
                <?php echo $categoryCurrent['RecipeCategory']['short_des' . $code]?>
            </p>
          </div>
        </div>
      </section><!-- /section -->

      <section class="row recipe-block recipes">
        <div class="col-md-12">
          <h3 class="title-h3-01 mb-25"><?php echo __('Recipes')?></h3>
          <?php 
          foreach($recipes as $key=>$recipe) :
            if($key && $key%3==0) :
                echo '</div>';
                echo '<div class="row mb-35">';
            endif;
          ?>
            <div class="col-xs-6 col-sm-4 col-md-4">
              <div class="recipe-box">
                <p class="img-recipe">
                    <img src="/files/images/<?php echo $recipe['Recipe']['image']?>" alt="" class="img-responsive" />
                </p>
              <h4 class="title-recipe">
                <!--<a href="/recipes/view/<?php echo $recipe['Recipe']['recipe_id']?>"><?php echo $recipe['Recipe']['name'. $code]?></a>-->
                <?php echo $this->Html->link( $recipe['Recipe']['name'. $code], array(
                    'controller' => 'recipes',
                    'action' => 'view',
                    'id' => $recipe['Recipe']['recipe_id'],
                    'slug' => str_replace(' ', '-', $recipe['Recipe']['name_en'])
                ));
                ?>
              </h4>
              </div><!-- /recipe-box -->
            </div>
          <?php endforeach;?>
          </div>
      </section><!-- /recipe-block -->
      <?php if($this->Paginator->counter('{:pages}') > 1) :?>
        <div class="pagging">
            <ul>
            <?php echo $this->Paginator->numbers(array('separator' => '', 'tag' => 'li', 'currentClass' => 'current'));?>
            </ul>
        </div>
        <?php endif;?>
    
    </div><!-- /#Main -->
</div><!-- /container -->